package com.zpark.cloud.alibaba.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 库存实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Slf4j
@Table(name = "t_storage")
public class Storage implements Serializable {
    @Id
    @KeySql(useGeneratedKeys = true)
    private Long id; // 库存ID

    @Column(name = "product_id")
    private Long productId; // 产品id
    private Integer total; //总库存
    private Integer used; //已用库存
    private Integer residue; //剩余库存
}
